package com.junlaninfo;

import java.util.HashMap;

/**
 * Created by 辉 on 2020/9/11.
 * 强引用
 */
public class Test2 {
    public static void main(String[] args) {
        HashMap<String, String> map1 = new HashMap<String, String>();
        HashMap<String, String> map2=map1;
        map1.put("名字","薛雄辉");
        map1=null;
        System.gc();
        System.out.println(map2.get("名字"));
    }
}
